package com.example.com.daervideo.activitys.users;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.com.daervideo.R;

/**
 * Created by i7-1 on 2018/12/6.
 */

public class MessageActivity extends AppCompatActivity implements View.OnClickListener {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_message_list);

        initlistener();

    }

    private void initlistener() {
        findViewById(R.id.dashang).setOnClickListener(this);
        findViewById(R.id.present).setOnClickListener(this);
        findViewById(R.id.comment).setOnClickListener(this);
        findViewById(R.id.attention).setOnClickListener(this);
        findViewById(R.id.feedback).setOnClickListener(this);
        findViewById(R.id.social).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Bundle bundle = new Bundle();
        switch (v.getId()) {
            case R.id.dashang:
                bundle.putInt("index", 1);
                break;
            case R.id.present:
                bundle.putInt("index", 2);
                break;
            case R.id.comment:
                bundle.putInt("index", 3);
                break;
            case R.id.attention:
                bundle.putInt("index", 4);
                break;
            case R.id.feedback:
                bundle.putInt("index", 5);
                break;

            case R.id.social:
                bundle.putInt("index", 6);
                break;

        }
        Intent intent = new Intent(this, CommentActivity.class);
        intent.putExtra("b", bundle);
        startActivity(intent);
    }
}
